Fix minor build problems related to MinGW64.
authorFabrice Popineau <fabrice.popineau@supelec.fr>
Sat, 11 Jan 2014 13:36:06 +0000 (15:36 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Jan 2014 13:36:06 +0000 (15:36 +0200)
 configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is
 "MINGW64" as well.

 nt/inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64.

 src/unexw32.c (_start) [__MINGW64__]: Define to __start.

ChangeLog
configure.ac
nt/ChangeLog
nt/inc/ms-w32.h
src/ChangeLog
src/unexw32.c

index 3f75020c3856a92ee90ea56444af703ce26f53d8..612e4e1b9d5233223c4b925ec5503f8f2345c0a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is
+       "MINGW64" as well.
+
 2014-01-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index b3d28d1d72077a12e91401defc7f9351cde802b9..8443d168c7dca0e137bc24d55602089ad6a475a0 100644 (file)
@@ -24,7 +24,8 @@ dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 AC_PREREQ(2.65)
 AC_INIT(emacs, 24.3.50)
 
-if test "x$MSYSTEM" = "xMINGW32"
+dnl We get MINGW64 with MSYS2
+if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
 then
   . $srcdir/nt/mingw-cfg.site
 
index accd376613e17787a2c0ffe92c32ebfcdda6dc4f..106403126aae9e135452b22f4330914c4a9cc03d 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@supelec.fr>
+
+       * inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64.
+
 2013-12-31  Fabrice Popineau  <fabrice.popineau@supelec.fr>
 
        * inc/ms-w32.h (sys_kill): Fix prototype.
index 7f523cb74f9e090d4e3fe00562e24f97a28ef768..dca3476b2b626686036dae533bc663ac0681f3b0 100644 (file)
@@ -388,6 +388,11 @@ extern int sigemptyset (sigset_t *);
 extern int sigaddset (sigset_t *, int);
 extern int sigfillset (sigset_t *);
 extern int sigprocmask (int, const sigset_t *, sigset_t *);
+/* MinGW64 defines pthread_sigmask as zero in its pthread_signal.h
+   header, but we have an implementation for that function in w32proc.c.  */
+#ifdef pthread_sigmask
+#undef pthread_sigmask
+#endif
 extern int pthread_sigmask (int, const sigset_t *, sigset_t *);
 extern int sigismember (const sigset_t *, int);
 extern int setpgrp (int, int);
index 846dc2078e45c7261c2eac6359a436c3797ae62a..0e1eedcd22f1e3bad10dd03c7f9ab350447bb0ca 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * unexw32.c (_start) [__MINGW64__]: Define to __start.
+
 2014-01-11  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (try_window_id): Don't use this function's optimizations
index 5411cd2a95c3d3a16b8b47532b07a1b8c5b4e4ba..f70cdd794784db778a64b01b678b5c2c350d18d8 100644 (file)
@@ -85,6 +85,13 @@ DWORD_PTR  extra_bss_size_static = 0;
 
 PIMAGE_SECTION_HEADER heap_section;
 
+/* MinGW64 doesn't add a leading underscore to external symbols,
+   whereas configure.ac sets up LD_SWITCH_SYSTEM_TEMACS to force the
+   entry point at __start, with two underscores.  */
+#ifdef __MINGW64__
+#define _start __start
+#endif
+
 /* Startup code for running on NT.  When we are running as the dumped
    version, we need to bootstrap our heap and .bss section into our
    address space before we can actually hand off control to the startup